package com.mingqijia.gassafety.job.hangzhou.request;

import cn.hutool.json.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author guoliang.lao
 * @version 1.0.0
 * @ClassName CreateCityThingModel.java
 * @Description 创建物模型
 * @createTime 2022年04月08日
 */
@Data
public class SetCityDeviceData {

    @ApiModelProperty("产品ID(createCityProduct返回)")
    private String productKey;

    @ApiModelProperty("设备ID(代表的是设备唯一标识)")
    private String deviceName;

    @ApiModelProperty("属性值")
    private List<PropertyContent> propertyContents;

    @ApiModelProperty("事件值")
    private List<EventContent> eventContents;

    @Data
    public class PropertyContent {
        @ApiModelProperty("标识符")
        private String identifier;

        @ApiModelProperty("名称")
        private String name;

        @ApiModelProperty("时间 毫秒")
        private Long time;

        @ApiModelProperty("值")
        private String value;
    }

    @Data
    public class EventContent {
        @ApiModelProperty("标识符")
        private String identifier;

        @ApiModelProperty("时间 毫秒")
        private Long time;

        @ApiModelProperty("名称")
        private String name;

        @ApiModelProperty("事件类型")
        private String type;

        @ApiModelProperty("事件值")
        private JSONObject value;
    }
}
